package com.zhouyu.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class OrderService {

	public OrderService() {
		System.out.println("orderService constructor");
	}

	// @Transactional(rollbackFor = Exception.class, propagation = Propagation.NEVER)
	public void transB() {
		System.out.println(user.getName());
	}

	@Value("EditorUser")
	@Resource
	private User user;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}
